class BaneosController < ApplicationController
  # GET /baneos
  # GET /baneos.xml
  def index
    @baneos = Baneo.find(:all)

    respond_to do |format|
      format.html # index.rhtml
      format.xml  { render :xml => @baneos.to_xml }
    end
  end

  # GET /baneos/1
  # GET /baneos/1.xml
  def show
    @baneo = Baneo.find(params[:id])

    respond_to do |format|
      format.html # show.rhtml
      format.xml  { render :xml => @baneo.to_xml }
    end
  end

  # GET /baneos/new
  def new
    @baneo = Baneo.new
  end

  # GET /baneos/1;edit
  def edit
    @baneo = Baneo.find(params[:id])
  end

  # POST /baneos
  # POST /baneos.xml
  def create
    @baneo = Baneo.new(params[:baneo])

    respond_to do |format|
      if @baneo.save
        flash[:notice] = 'Baneo was successfully created.'
        format.html { redirect_to baneo_url(@baneo) }
        format.xml  { head :created, :location => baneo_url(@baneo) }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @baneo.errors.to_xml }
      end
    end
  end

  # PUT /baneos/1
  # PUT /baneos/1.xml
  def update
    @baneo = Baneo.find(params[:id])

    respond_to do |format|
      if @baneo.update_attributes(params[:baneo])
        flash[:notice] = 'Baneo was successfully updated.'
        format.html { redirect_to baneo_url(@baneo) }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @baneo.errors.to_xml }
      end
    end
  end

  # DELETE /baneos/1
  # DELETE /baneos/1.xml
  def destroy
    @baneo = Baneo.find(params[:id])
    @baneo.destroy

    respond_to do |format|
      format.html { redirect_to baneos_url }
      format.xml  { head :ok }
    end
  end
end
